/**
 * Copyright (C) Skywares Information Technology, LTD. 
 * All Rights Reserved.
 *
 * UserDao.java created on 2020年2月1日 下午5:49:46 by Lyon Lu 
 */
package com.mvc.server.miaosha.dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.mvc.server.miaosha.pojo.User;

/**
 * <pre>
 * Description:
 * 
 * @author Lyon Lu
 * @date 2020年2月1日 下午5:49:46
 *
 * </pre>
 */
@Mapper
public interface UserDao {
	
	@Select("select * from user where id = #{id}")
	User getById(@Param("id") int id);
	
	@Insert("insert into user(id, name)values(#{id}, #{name})")
	public int insert(User user);
	
	@Update("update user set name = #{name} where id = #{id}")
	public int update(User user);

}
